//
//  BasicInfoTableViewCell.m
//  BigToBig
//
//  Created by 毛丽媛 on 16/7/20.
//  Copyright © 2016年 cn.cloudtp. All rights reserved.
//

#import "BasicInfoTableViewCell.h"
#define WIDTH self.contentView.frame.size.width
#define height self.contentView.frame.size.height

@implementation BasicInfoTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView{
    
    self.headPic = [[UIImageView alloc] init];
    //self.headPic.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.headPic];
    
    self.nameLabel = [[UILabel alloc] init];
    //self.name.backgroundColor = [UIColor cyanColor];
    self.nameLabel.font = [UIFont systemFontOfSize:19];
    [self.contentView addSubview:self.nameLabel];
    
    self.describe = [[UILabel alloc] init];
    //self.content.backgroundColor = [UIColor magentaColor];
    self.describe.font = [UIFont systemFontOfSize:14];
    self.describe.textColor = [UIColor lightGrayColor];
    [self.contentView addSubview:self.describe];
    
    self.editPic = [[UIImageView alloc] init];
    //self.editPic.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.editPic];
    
    self.guanzhuPic = [[UIImageView alloc] init];
    //self.guanzhuPic.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:self.guanzhuPic];
    
    self.guanzhu = [[UILabel alloc] init];
    self.guanzhu.font = [UIFont systemFontOfSize:13];
    self.guanzhu.textColor = [UIColor lightGrayColor];
    //self.guanzhu.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.guanzhu];
    
    self.chakanPic = [[UIImageView alloc] init];
    //self.chakanPic.backgroundColor = [UIColor cyanColor];
    [self.contentView addSubview:self.chakanPic];
    
    self.chakan = [[UILabel alloc] init];
    self.chakan.font = [UIFont systemFontOfSize:13];
    self.chakan.textColor = [UIColor lightGrayColor];
    //self.chakan.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.chakan];

    
}

- (void)layoutSubviews{ 
    [super layoutSubviews];
    
    self.headPic.frame = CGRectMake(10, 15, height - 30, height - 30);
    self.nameLabel.frame = CGRectMake(self.headPic.maxX + 10, self.headPic.y,180, 30);
    self.describe.frame = CGRectMake(self.headPic.maxX + 10, self.nameLabel.maxY + 10, WIDTH - 100, 20);
    
    self.editPic.frame = CGRectMake(WIDTH - 40, 15, 25, 25);
    self.guanzhuPic.frame = CGRectMake(WIDTH - 160, height - 20, 15, 13);
    self.guanzhu.frame = CGRectMake(self.guanzhuPic.maxX + 3, height - 25, 55, 20);
    
    self.chakanPic.frame = CGRectMake(self.guanzhu.maxX + 3, height - 20, 15, 10);
    self.chakan.frame = CGRectMake(self.chakanPic.maxX + 3, height - 25, 65, 20);
    
}


- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
